package com.bkgy.modular.configureRules.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.configureRules.dto.*;
import com.bkgy.modular.configureRules.service.*;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author
 * @version 1.0
 * @ClassName ConfigureRulesController
 * @date 2023/4/19 10:13
 */
@RestController
@RequestMapping("/configureRules")
public class ConfigureRulesController {
    @Resource
    private KHDegree2130Service khDegree2130Service;

    @Resource
    private LTKHDegreeGrading2130Service ltkhDegreeGrading2130Service;

    @Resource
    private LTRigidSeedGrading2130Service ltRigidSeedGrading2130Service;

    @Resource
    private RigidSeedGrading1720Service rigidSeedGrading1720Service;

    @Resource
    private RigidSeedGrading2130Srvice rigidSeedGrading2130Srvice;

    @Resource
    private ThicknessGrading1720Service thicknessGrading1720Service;

    @Resource
    private AcidRollingLMN2130Service acidRollingLMN2130Service;

    @Resource
    private AcidRollingLMN1720Service acidRollingLMN1720Service;

    @Resource
    private SimulatedFriction2130Service simulatedFriction2130Service;

    @Resource
    private SimulatedFriction1720Service simulatedFriction1720Service;

    @Resource
    private UnitTension2130Service unitTension2130Service;

    @Resource
    private UnitTension1720Service unitTension1720Service;

    /**
     * 1720酸轧钢种分档查询
     * @return
     */
    @PostMapping("/queryRigidSeedConfiguration1720")
    public ResultData queryRigidSeedConfiguration1720() {
        return rigidSeedGrading1720Service.findRigidSeedConfiguration();
    }

    /**
     * 1720酸轧钢种分档根据主键修改数据
     * @param dto
     * @return
     */
    @PostMapping("/updateRigidSeedConfiguration1720")
    public ResultData updateRigidSeedConfiguration1720(@RequestBody RigidSeedGrading1720Dto dto) {
        return rigidSeedGrading1720Service.updateRigidSeedConfiguration1720(dto);
    }

    /**
     * 1720酸轧宽厚度分档数据查询
     * @return
     */
    @PostMapping("/queryThicknessConfiguration1720")
    public ResultData queryThicknessConfiguration1720() {
        return thicknessGrading1720Service.queryThicknessConfiguration1720();
    }

    /**
     * 1720酸轧宽厚度分档更新数据
     * @return
     */
    @PostMapping("/updateThicknessConfiguration1720")
    public ResultData updateThicknessConfiguration1720(@RequestBody ThicknessGrading1720Dto dto) {
        return thicknessGrading1720Service.updateThicknessConfiguration1720(dto);
    }

    /**
     * 2130酸轧钢种分档查询数据
     * @return
     */
    @PostMapping("/queryRigidSeedGrading2130")
    public ResultData queryRigidSeedGrading2130() {
        return rigidSeedGrading2130Srvice.queryRigidSeedGrading2130();
    }

    /**
     * 2130酸轧钢种分档更新数据
     * @return
     */
    @PostMapping("/updateRigidSeedGrading2130")
    public ResultData updateRigidSeedGrading2130(@RequestBody RigidSeedGrading2130Dto dto) {
        return rigidSeedGrading2130Srvice.updateRigidSeedGrading2130(dto);
    }

    /**
     * 2130酸轧宽厚度分档查询数据
     * @return
     */
    @PostMapping("/queryKHDegre2130")
    public ResultData queryKHDegre2130() {
        return khDegree2130Service.queryKHDegre2130();
    }

    /**
     * 2130酸轧宽厚度分档更新数据
     * @return
     */
    @PostMapping("/updateKHDegre2130")
    public ResultData updateKHDegre2130(@RequestBody KHDegree2130Dto dto) {
        return khDegree2130Service.updateKHDegre2130(dto);
    }

    /**
     * 2130连退钢种分档数据查询
     * @return
     */
    @PostMapping("/queryLtRigidSeedGrading2130")
    public ResultData queryltRigidSeedGrading2130() {
        return ltRigidSeedGrading2130Service.queryltRigidSeedGrading2130();
    }

    /**
     * 2130连退钢种分档数据更新
     * @return
     */
    @PostMapping("/updateLtRigidSeedGrading2130")
    public ResultData updateLtRigidSeedGrading2130(@RequestBody LTRigidSeedGrading2130Dto dto) {
        return ltRigidSeedGrading2130Service.updateLtRigidSeedGrading2130(dto);
    }

    /**
     * 2130连退宽厚度分档数据查询
     * @return
     */
    @PostMapping("/queryLTKHDegreeGrading2130")
    public ResultData queryLTKHDegreeGrading2130() {
        return ltkhDegreeGrading2130Service.queryLTKHDegreeGrading2130();
    }

    /**
     * 2130连退宽厚度分档数据更新
     * @return
     */
    @PostMapping("/updateLTKHDegreeGrading2130")
    public ResultData updateLTKHDegreeGrading2130(@RequestBody LTKHDegreeGrading2130Dto dto) {
        return ltkhDegreeGrading2130Service.updateLTKHDegreeGrading2130(dto);
    }

    /**
     * 2130酸轧LMN分档数据查询
     * @return
     */
    @PostMapping("/queryAcidRollingLMN2130")
    public ResultData queryAcidRollingLMN2130() {
        return acidRollingLMN2130Service.queryAcidRollingLMN2130();
    }

    /**
     * 2130酸轧LMN分档数据更新
     * @return
     */
    @PostMapping("/updateAcidRollingLMN2130")
    public ResultData updateAcidRollingLMN2130(@RequestBody AcidRollingLMN2130Dto dto) {
        return acidRollingLMN2130Service.updateAcidRollingLMN2130(dto);
    }

    /**
     * 1720酸轧LMN分档数据查询
     * @return
     */
    @PostMapping("/queryAcidRollingLMN1720")
    public ResultData queryAcidRollingLMN1720() {
        return acidRollingLMN1720Service.queryAcidRollingLMN1720();
    }

    /**
     * 1720酸轧LMN分档数据更新
     * @return
     */
    @PostMapping("/updateAcidRollingLMN1720")
    public ResultData updateAcidRollingLMN1720(@RequestBody AcidRollingLMN1720Dto dto) {
        return acidRollingLMN1720Service.updateAcidRollingLMN1720(dto);
    }

    /**
     * 2130酸轧仿真摩擦系数数据查询
     * @return
     */
    @PostMapping("/querySimulatedFriction2130")
    public ResultData querySimulatedFriction2130(@RequestBody JSONObject jsonObject) {
        return simulatedFriction2130Service.querySimulatedFriction2130(jsonObject);
    }

    /**
     * 2130酸轧仿真摩擦系数数据更新
     * @return
     */
    @PostMapping("/updateSimulatedFriction2130")
    public ResultData updateSimulatedFriction2130(@RequestBody SimulatedFriction2130Dto dto) {
        return simulatedFriction2130Service.updateSimulatedFriction2130(dto);
    }

    /**
     * 1720酸轧仿真摩擦系数数据查询
     * @return
     */
    @PostMapping("/querySimulatedFriction1720")
    public ResultData querySimulatedFriction1720(@RequestBody JSONObject jsonObject) {
        return simulatedFriction1720Service.querySimulatedFriction1720(jsonObject);
    }

    /**
     * 1720酸轧仿真摩擦系数数据更新
     * @return
     */
    @PostMapping("/updateSimulatedFriction1720")
    public ResultData updateSimulatedFriction1720(@RequestBody SimulatedFriction1720Dto dto) {
        return simulatedFriction1720Service.updateSimulatedFriction1720(dto);
    }

    /**
     * 2130酸轧单位张力数据查询
     * @return
     */
    @PostMapping("/queryUnitTension2130")
    public ResultData queryUnitTension2130(@RequestBody JSONObject jsonObject) {
        return unitTension2130Service.queryUnitTension2130(jsonObject);
    }

    /**
     * 2130酸轧单位张力数据更新
     * @return
     */
    @PostMapping("/updateUnitTension2130")
    public ResultData updateUnitTension2130(@RequestBody UnitTension2130Dto dto) {
        return unitTension2130Service.updateUnitTension2130(dto);
    }

    /**
     * 1720酸轧单位张力数据查询
     * @return
     */
    @PostMapping("/queryUnitTension1720")
    public ResultData queryUnitTension1720(@RequestBody JSONObject jsonObject) {
        return unitTension1720Service.queryUnitTension1720(jsonObject);
    }

    /**
     * 1720酸轧单位张力数据更新
     * @return
     */
    @PostMapping("/updateUnitTension1720")
    public ResultData updateUnitTension1720(@RequestBody UnitTension1720Dto dto) {
        return unitTension1720Service.updateUnitTension1720(dto);
    }
}
